var mongoose = require('mongoose');

var amzFeedHistorySchema = new mongoose.Schema({
    FeedSubmissionId: {
        type: String,
        required: true
    },
    ptSellerAccount_storeId: {
        type: String,
        required: true
    },
    FeedProductList: [{
        product_id: {
            type: String,
            required: false
        },
        item_sku: {
            type: String,
            required: false
        },
         version: {
             type: Number,
             required: false
         },
        image_field_with_change: [{
            type: String,
            required: false
        }]
    }],
    FeedSubmissionLog: {
        SubmissionDateTime: {
            type: String,
            required: false
        },
        FeedSubType: {
            type: String,
            required: false
        },
        SubmissionStatus: {
            type: String,
            required: false
        }
    },
    FeedResponseLog: [{
        ResponseDateTime: {
            type: String,
            required: false
        },
        sku: {
            type: String,
            required: false
        },
        FeedProcessionStatus: {
            type: String,
            required: false
        },
        Message: {
            type: String,
            required: false
        }
    }]
}, {
    timestamps: true
});

mongoose.model('AMZFeedHistorySchema', amzFeedHistorySchema, "amzFeedHistory");
// define methods
